Until 3500 BC, South Asia was occupied primarily by hunter-gatherer societies. The Indus Valley civilisation was the first city-based society. After its decline in around 1800 BC, village farming spread throughout northern India until the appearance of new cities in the Ganges valley. These developed into the great Mauryan empire of the 3rd century BC, which brought much of south Asia under the rule of a single dynasty, before fragmenting into smaller states and empires.